<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>添加白名单</title>
	<script type="text/javascript" src="./jquery-3.1.1.js"></script>
	<script type="text/javascript">
    function check(frm){
        if (frm.word.value=='') {
             $("#view").html("不能为空");
            return false;
            
        }else{
        	 $.ajax({
                url:'insert_white.php',
                data:'word='+frm.word.value,
                type:'post',
                dataType:'json',
                success:function(re){
	                 $("#view").html("插入白名单<br>成功"+re[0]+"个<br>失败"+re[1]+"个");
                }
            })


        }
    }
	</script>
</head>
<body>
<form action="insert_white.php" name="myform">
<textarea name="word" id="word" cols="60" rows="15">
</textarea><span><a href="index.html">&nbsp;<<返回检索页</a></span>
<div class="submit"><input type="button" value="提交" onclick="check(document.myform);" /></div>
</form>
<p id="view"></p>
	
</body>
</html>